package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.pojo.Menu;
import com.itheima.service.MenuService;
import com.itheima.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class DuuboConfig {

    @Reference
    private PermissionService permissionService;

    @Reference
    private MenuService menuService;

    @Bean
    public PermissionService initPermissionSerivce(){
        return permissionService;
    }

    @Bean
    public MenuService initMenuSerivce(){
        return menuService;
    }



}